<script>
import {  getTodayOrderCount} from '@/api/sale/sale'; // 确保你有这个 API

export default {
  data() {
  return{
    todayOrder:0
  }
  },
  mounted() {
    this.fetchStatistics();
  },
  methods: {
    async fetchStatistics() {
      const orderResponse = await getTodayOrderCount();
      this.todayOrder = orderResponse.data || 0;
    }
  }
}
</script>

<template>
  <el-card class="box-contenier">

    <div class="title">
      <div>
        <span>今日订单数:</span>
        <strong>{{ todayOrder }}</strong>

      </div>
    </div>

  </el-card>
</template>

<style scoped lang="scss">
.box-contenier{
  margin: 10px 10px;

  .title{
    padding:10px 0 10px 0 ;
  }
}


</style>
